home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / ddrible.c < prev    next >
C/C++ Source or Header  |  2000-04-10  |  16KB  |  461 lines

  1. /***************************************************************************
  2.  
  3. Double Dribble(GX690) (c) Konami 1986
  4.  
  5. Driver by Manuel Abadia <manu@teleline.es>
  6.  
  7. ***************************************************************************/
  8.  
  9. #include "driver.h"
  10. #include "cpu/m6809/m6809.h"
  11. #include "vidhrdw/generic.h"
  12.  
  13. extern int ddrible_int_enable_0;
  14. extern int ddrible_int_enable_1;
  15.  
  16. static unsigned char *ddrible_sharedram;
  17. static unsigned char *ddrible_snd_sharedram;
  18.  
  19. extern unsigned char *ddrible_spriteram_1;
  20. extern unsigned char *ddrible_spriteram_2;
  21. extern unsigned char *ddrible_fg_videoram;
  22. extern unsigned char *ddrible_bg_videoram;
  23.  
  24. /* video hardware memory handlers */
  25. WRITE_HANDLER( ddrible_fg_videoram_w );
  26. WRITE_HANDLER( ddrible_bg_videoram_w );
  27.  
  28. /* video hardware functions */
  29. void ddrible_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  30. int ddrible_vh_start( void );
  31. void ddrible_vh_screenrefresh( struct osd_bitmap *bitmap, int full_refresh );
  32. WRITE_HANDLER( K005885_0_w );
  33. WRITE_HANDLER( K005885_1_w );
  34.  
  35.  
  36. static int ddrible_interrupt_0( void )
  37. {
  38.     if (ddrible_int_enable_0)
  39.         return M6809_INT_FIRQ;
  40.     return ignore_interrupt();
  41. }
  42.  
  43. static int ddrible_interrupt_1( void )
  44. {
  45.     if (ddrible_int_enable_1)
  46.         return M6809_INT_FIRQ;
  47.     return ignore_interrupt();
  48. }
  49.  
  50.  
  51. static WRITE_HANDLER( ddrible_bankswitch_w )
  52. {
  53.     int bankaddress;
  54.     unsigned char *RAM = memory_region(REGION_CPU1);
  55.  
  56.     bankaddress = 0x10000 + (data & 0x0f)*0x2000;
  57.     cpu_setbank(1,&RAM[bankaddress]);
  58. }
  59.  
  60.  
  61. static READ_HANDLER( ddrible_sharedram_r )
  62. {
  63.     return ddrible_sharedram[offset];
  64. }
  65.  
  66. static WRITE_HANDLER( ddrible_sharedram_w )
  67. {
  68.     ddrible_sharedram[offset] = data;
  69. }
  70.  
  71. static READ_HANDLER( ddrible_snd_sharedram_r )
  72. {
  73.     return ddrible_snd_sharedram[offset];
  74. }
  75.  
  76. static WRITE_HANDLER( ddrible_snd_sharedram_w )
  77. {
  78.     ddrible_snd_sharedram[offset] = data;
  79. }
  80.  
  81. static WRITE_HANDLER( ddrible_coin_counter_w )
  82. {
  83.     /* b4-b7: unused */
  84.     /* b2-b3: unknown */
  85.     /* b1: coin counter 2 */
  86.     /* b0: coin counter 1 */
  87.     coin_counter_w(0,(data) & 0x01);
  88.     coin_counter_w(1,(data >> 1) & 0x01);
  89. }
  90.  
  91. static READ_HANDLER( ddrible_vlm5030_busy_r )
  92. {
  93.     return rand(); /* patch */
  94.     if (VLM5030_BSY()) return 1;
  95.     else return 0;
  96. }
  97.  
  98. static WRITE_HANDLER( ddrible_vlm5030_ctrl_w )
  99. {
  100.     unsigned char *SPEECH_ROM = memory_region(REGION_SOUND1);
  101.     /* b7 : vlm data bus OE   */
  102.     /* b6 : VLM5030-RST       */
  103.     /* b5 : VLM5030-ST        */
  104.     /* b4 : VLM5300-VCU       */
  105.     /* b3 : ROM bank select   */
  106.     VLM5030_RST( data & 0x40 ? 1 : 0 );
  107.     VLM5030_ST(  data & 0x20 ? 1 : 0 );
  108.     VLM5030_VCU( data & 0x10 ? 1 : 0 );
  109.     VLM5030_set_rom(&SPEECH_ROM[data & 0x08 ? 0x10000 : 0]);
  110.     /* b2 : SSG-C rc filter enable */
  111.     /* b1 : SSG-B rc filter enable */
  112.     /* b0 : SSG-A rc filter enable */
  113.     set_RC_filter(2,1000,2200,1000,data & 0x04 ? 150000 : 0); /* YM2203-SSG-C */
  114.     set_RC_filter(1,1000,2200,1000,data & 0x02 ? 150000 : 0); /* YM2203-SSG-B */
  115.     set_RC_filter(0,1000,2200,1000,data & 0x01 ? 150000 : 0); /* YM2203-SSG-A */
  116. }
  117.  
  118.  
  119. static struct MemoryReadAddress readmem_cpu0[] =
  120. {
  121.     { 0x1800, 0x187f, MRA_RAM },            /* palette */
  122.     { 0x2000, 0x3fff, MRA_RAM },            /* Video RAM 1 + Object RAM 1 */
  123.     { 0x4000, 0x5fff, MRA_RAM },            /* shared RAM with CPU #1 */
  124.     { 0x6000, 0x7fff, MRA_RAM },            /* Video RAM 2 + Object RAM 2 */
  125.     { 0x8000, 0x9fff, MRA_BANK1 },            /* banked ROM */
  126.     { 0xa000, 0xffff, MRA_ROM },            /* ROM */
  127.     { -1 }
  128. };
  129.  
  130.  
  131. static struct MemoryWriteAddress writemem_cpu0[] =
  132. {
  133.     { 0x0000, 0x0004, K005885_0_w },                                /* video registers (005885 #1) */
  134.     { 0x0800, 0x0804, K005885_1_w },                                /* video registers (005885 #2) */
  135.     { 0x1800, 0x187f, paletteram_xBBBBBGGGGGRRRRR_swap_w, &paletteram },/* seems wrong, MSB is used as well */
  136.     { 0x2000, 0x2fff, ddrible_fg_videoram_w, &ddrible_fg_videoram },/* Video RAM 1 */
  137.     { 0x3000, 0x3fff, MWA_RAM, &ddrible_spriteram_1 },                /* Object RAM 1 */
  138.     { 0x4000, 0x5fff, MWA_RAM, &ddrible_sharedram },                /* shared RAM with CPU #1 */
  139.     { 0x6000, 0x6fff, ddrible_bg_videoram_w, &ddrible_bg_videoram },/* Video RAM 2 */
  140.     { 0x7000, 0x7fff, MWA_RAM, &ddrible_spriteram_2 },                /* Object RAM 2 + Work RAM */
  141.     { 0x8000, 0x8000, ddrible_bankswitch_w },                        /* bankswitch control */
  142.     { 0x8000, 0xffff, MWA_ROM },                                    /* ROM */
  143.     { -1 }
  144. };
  145.  
  146. static struct MemoryReadAddress readmem_cpu1[] =
  147. {
  148.     { 0x0000, 0x1fff, ddrible_sharedram_r },        /* shared RAM with CPU #0 */
  149.     { 0x2000, 0x27ff, ddrible_snd_sharedram_r },    /* shared RAM with CPU #2 */
  150.     { 0x2800, 0x2800, input_port_3_r },                /* DSW #1 */
  151.     { 0x2801, 0x2801, input_port_0_r },                /* player 1 inputs */
  152.     { 0x2802, 0x2802, input_port_1_r },                /* player 2 inputs */
  153.     { 0x2803, 0x2803, input_port_2_r },                /* coinsw & start */
  154.     { 0x2c00, 0x2c00, input_port_4_r },                /* DSW #2 */
  155.     { 0x3000, 0x3000, input_port_5_r },                /* DSW #3 */
  156.     { 0x8000, 0xffff, MRA_ROM },                    /* ROM */
  157.     { -1 }
  158. };
  159.  
  160. static struct MemoryWriteAddress writemem_cpu1[] =
  161. {
  162.     { 0x0000, 0x1fff, ddrible_sharedram_w },        /* shared RAM with CPU #0 */
  163.     { 0x2000, 0x27ff, ddrible_snd_sharedram_w },    /* shared RAM with CPU #2 */
  164.     { 0x3400, 0x3400, ddrible_coin_counter_w },        /* coin counters */
  165.     { 0x3c00, 0x3c00, watchdog_reset_w },            /* watchdog reset */
  166.     { 0x8000, 0xffff, MWA_ROM },                    /* ROM */
  167.     { -1 }
  168. };
  169.  
  170. static struct MemoryReadAddress readmem_cpu2[] =
  171. {
  172.     { 0x0000, 0x07ff, MRA_RAM },                    /* shared RAM with CPU #1 */
  173.     { 0x1000, 0x1000, YM2203_status_port_0_r },        /* YM2203 */
  174.     { 0x1001, 0x1001, YM2203_read_port_0_r },        /* YM2203 */
  175.     { 0x8000, 0xffff, MRA_ROM },                    /* ROM */
  176.     { -1 }
  177. };
  178.  
  179. static struct MemoryWriteAddress writemem_cpu2[] =
  180. {
  181.     { 0x0000, 0x07ff, MWA_RAM, &ddrible_snd_sharedram  },    /* shared RAM with CPU #1 */
  182.     { 0x1000, 0x1000, YM2203_control_port_0_w },            /* YM2203 */
  183.     { 0x1001, 0x1001, YM2203_write_port_0_w },                /* YM2203 */
  184.     { 0x3000, 0x3000, VLM5030_data_w },                        /* Speech data */
  185.     { 0x8000, 0xffff, MWA_ROM },                            /* ROM */
  186.     { -1 }
  187. };
  188.  
  189. INPUT_PORTS_START( ddribble )
  190.     PORT_START    /* PLAYER 1 INPUTS */
  191.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  192.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  193.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
  194.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
  195.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  196.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
  197.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
  198.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  199.  
  200.     PORT_START    /* PLAYER 2 INPUTS */
  201.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_PLAYER2 )
  202.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_PLAYER2 )
  203.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_PLAYER2 )
  204.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_PLAYER2 )
  205.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
  206.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
  207.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
  208.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  209.  
  210.     PORT_START    /* COINSW & START */
  211.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  212.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  213.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  214.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  215.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  216.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
  217.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  218.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  219.  
  220.     PORT_START    /* DSW #1 */
  221.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  222.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  223.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  224.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  225.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  226.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  227.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  228.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )
  229.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  230.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  231.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  232.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  233.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  234.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  235.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  236.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  237.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  238.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  239.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  240.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  241.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  242.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  243.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  244.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  245.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_5C ) )
  246.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  247.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  248.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  249.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  250.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  251.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  252.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  253.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  254.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  255.  
  256.     PORT_START    /* DSW #2 */
  257.     PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
  258.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  259.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  260.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
  261.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  262.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  263.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
  264.     PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
  265.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  266.     PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
  267.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  268.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  269.     PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
  270.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  271.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  272.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  273.     PORT_DIPSETTING(    0x60, "Easy" )
  274.     PORT_DIPSETTING(    0x40, "Normal" )
  275.     PORT_DIPSETTING(    0x20, "Hard" )
  276.     PORT_DIPSETTING(    0x00, "Hardest" )
  277.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  278.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  279.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  280.  
  281.     PORT_START    /* DSW #3 */
  282.     PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
  283.     PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
  284.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  285.     PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
  286.     PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
  287.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  288.     PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
  289.     PORT_DIPNAME( 0x08, 0x00, "Allow vs match with 1 Credit" )
  290.     PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
  291.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  292.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
  293.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
  294.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
  295.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
  296. INPUT_PORTS_END
  297.  
  298. static struct GfxLayout charlayout1 =
  299. {
  300.     8,8,            /* 8*8 characters */
  301.     4096,            /* 4096 characters */
  302.     4,                /* 4 bits per pixel */
  303.     { 0, 1, 2, 3 },    /* the four bitplanes are packed in one nibble */
  304.     { 0*4, 1*4, 0x20000*8+0*4, 0x20000*8+1*4, 2*4, 3*4, 0x20000*8+2*4, 0x20000*8+3*4 },
  305.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  306.     16*8            /* every char takes 16 consecutive bytes */
  307. };
  308.  
  309. static struct GfxLayout charlayout2 =
  310. {
  311.     8,8,            /* 8*8 characters */
  312.     8192,            /* 8192 characters */
  313.     4,                /* 4 bits per pixel */
  314.     { 0, 1, 2, 3 }, /* the four bitplanes are packed in one nibble */
  315.     { 0*4, 1*4, 0x20000*8+0*4, 0x20000*8+1*4, 2*4, 3*4, 0x20000*8+2*4, 0x20000*8+3*4 },
  316.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  317.     16*8            /* every char takes 16 consecutive bytes */
  318. };
  319.  
  320. static struct GfxLayout spritelayout1 =
  321. {
  322.     16,16,            /* 16*16 sprites */
  323.     1024,            /* 1024 sprites */
  324.     4,                /* 4 bits per pixel */
  325.     { 0, 1, 2, 3 },    /* the four bitplanes are packed in one nibble */
  326.     { 0*4, 1*4, 0x20000*8+0*4, 0x20000*8+1*4, 2*4, 3*4, 0x20000*8+2*4, 0x20000*8+3*4,
  327.         16*8+0*4, 16*8+1*4, 0x20000*8+16*8+0*4, 0x20000*8+16*8+1*4, 16*8+2*4, 16*8+3*4, 0x20000*8+16*8+2*4, 0x20000*8+16*8+3*4 },
  328.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  329.             16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16 },
  330.     64*8            /* every sprite takes 64 consecutive bytes */
  331. };
  332.  
  333. static struct GfxLayout spritelayout2 =
  334. {
  335.     16,16,            /* 16*16 sprites */
  336.     2048,            /* 2048 sprites */
  337.     4,                /* 4 bits per pixel */
  338.     { 0, 1, 2, 3 },    /* the four bitplanes are packed in one nibble */
  339.     { 0*4, 1*4, 0x20000*8+0*4, 0x20000*8+1*4, 2*4, 3*4, 0x20000*8+2*4, 0x20000*8+3*4,
  340.         16*8+0*4, 16*8+1*4, 0x20000*8+16*8+0*4, 0x20000*8+16*8+1*4, 16*8+2*4, 16*8+3*4, 0x20000*8+16*8+2*4, 0x20000*8+16*8+3*4 },
  341.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  342.             16*16, 17*16, 18*16, 19*16, 20*16, 21*16, 22*16, 23*16 },
  343.     64*8            /* every sprite takes 64 consecutive bytes */
  344. };
  345.  
  346. static struct GfxDecodeInfo gfxdecodeinfo[] =
  347. {
  348.     { REGION_GFX1, 0x00000, &charlayout1,     48,  1 },    /* colors 48-63 */
  349.     { REGION_GFX2, 0x00000, &charlayout2,     16,  1 },    /* colors 16-31 */
  350.     { REGION_GFX1, 0x10000, &spritelayout1,  32,  1 },    /* colors 32-47 */
  351.     { REGION_GFX2, 0x40000, &spritelayout2,  64, 16 },    /* colors  0-15 but using lookup table */
  352.     { -1 } /* end of array */
  353. };
  354.  
  355. static struct YM2203interface ym2203_interface =
  356. {
  357.     1,            /* 1 chip */
  358.     3580000,    /* 3.58 MHz */
  359.     { YM2203_VOL(25,25) },
  360.     { 0 },
  361.     { ddrible_vlm5030_busy_r },
  362.     { ddrible_vlm5030_ctrl_w },
  363.     { 0 }
  364. };
  365.  
  366. static struct VLM5030interface vlm5030_interface =
  367. {
  368.     3580000,    /* 3.58 MHz */
  369.     25,         /* volume */
  370.     REGION_SOUND1,/* memory region of speech rom */
  371.     0x10000,    /* memory size 64Kbyte * 2 bank */
  372.     0           /* VCU pin level (default) */
  373. };
  374.  
  375. static struct MachineDriver machine_driver_ddribble =
  376. {
  377.     /* basic machine hardware  */
  378.     {
  379.         {
  380.             CPU_M6809,            /* CPU #0 */
  381.             1536000,            /* 18432000/12 MHz? */
  382.             readmem_cpu0,writemem_cpu0,0,0,
  383.             ddrible_interrupt_0,1
  384.         },
  385.         {
  386.             CPU_M6809,            /* CPU #1 */
  387.             1536000,            /* 18432000/12 MHz? */
  388.             readmem_cpu1,writemem_cpu1,0,0,
  389.             ddrible_interrupt_1,1
  390.         },
  391.         {
  392.             CPU_M6809,            /* SOUND CPU */
  393.             1536000,            /* 18432000/12 MHz? */
  394.             readmem_cpu2,writemem_cpu2,0,0,
  395.             ignore_interrupt,1
  396.         },
  397.     },
  398.     60, DEFAULT_60HZ_VBLANK_DURATION,
  399.     100,    /* we need heavy synch */
  400.     0,
  401.  
  402.     /* video hardware */
  403.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  404.     //64*8, 32*8, { 0*8, 64*8-1, 2*8, 30*8-1 },
  405.     gfxdecodeinfo,
  406.     64, 64 + 256,
  407.     ddrible_vh_convert_color_prom,
  408.  
  409.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  410.     0,
  411.     ddrible_vh_start,
  412.     0,
  413.     ddrible_vh_screenrefresh,
  414.  
  415.     /* sound hardware */
  416.     0,0,0,0,
  417.     {
  418.         {
  419.             SOUND_YM2203,
  420.             &ym2203_interface
  421.         },
  422.         {
  423.             SOUND_VLM5030,
  424.             &vlm5030_interface
  425.         }
  426.     }
  427. };
  428.  
  429.  
  430. ROM_START( ddribble )
  431.     ROM_REGION( 0x1a000, REGION_CPU1 ) /* 64K CPU #0 + 40K for Banked ROMS */
  432.     ROM_LOAD( "690c03.bin",    0x10000, 0x0a000, 0x07975a58 )
  433.     ROM_CONTINUE(            0x0a000, 0x06000 )
  434.  
  435.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64 for the CPU #1 */
  436.     ROM_LOAD( "690c02.bin", 0x08000, 0x08000, 0xf07c030a )
  437.  
  438.     ROM_REGION( 0x10000, REGION_CPU3 )    /* 64k for the SOUND CPU */
  439.     ROM_LOAD( "690b01.bin", 0x08000, 0x08000, 0x806b8453 )
  440.  
  441.     ROM_REGION( 0x40000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  442.     ROM_LOAD( "690a05.bin",    0x00000, 0x20000, 0x6a816d0d )    /* characters (set 1) & obtects (set 1) */
  443.     ROM_LOAD( "690a06.bin",    0x20000, 0x20000, 0x46300cd0 )    /* characters (set 1) & objects (set 1) */
  444.  
  445.     ROM_REGION( 0x80000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  446.     ROM_LOAD( "690a10.bin", 0x00000, 0x20000, 0x61efa222 )    /* characters (set 2) */
  447.     ROM_LOAD( "690a09.bin", 0x20000, 0x20000, 0xab682186 )    /* characters (set 2) */
  448.     ROM_LOAD( "690a08.bin",    0x40000, 0x20000, 0x9a889944 )    /* objects (set 2) */
  449.     ROM_LOAD( "690a07.bin",    0x60000, 0x20000, 0xfaf81b3f )    /* objects (set 2) */
  450.  
  451.     ROM_REGION( 0x0100, REGION_PROMS )
  452.     ROM_LOAD( "690a11.i15", 0x0000, 0x0100, 0xf34617ad )    /* sprite lookup table */
  453.  
  454.     ROM_REGION( 0x20000, REGION_SOUND1 )    /* 128k for the VLM5030 data */
  455.     ROM_LOAD( "690a04.bin", 0x00000, 0x20000, 0x1bfeb763 )
  456. ROM_END
  457.  
  458.  
  459.  
  460. GAME( 1986, ddribble, 0, ddribble, ddribble, 0, ROT0, "Konami", "Double Dribble")
  461.